import React, { useEffect, useState, useContext } from 'react';

interface WrapperProps {
  children: React.ElementType;
  options?: any
  value?: any
  onChange?: any
  required?: boolean
}

export function Wrapper({ children, options, value, onChange,required }: WrapperProps) {


  const Comp = children

  const [val, setVal] = useState("")
  // console.log(options);
  useEffect(() => {

    // setVal(valTmp)
  }, [value])

  return (
    <>
      <Comp {...options} required={required}/>
    </>
  );
}
